package de.mhus.lib.mandala.form;

import de.mhus.lib.mandala.Response;

public class TextArea extends FormInput {

	private int rows = 3;

	public TextArea(String id, String caption) {
		super(id, caption);
	}

	@Override
	protected void doRenderEdit(Response out) {
		out.startTag("textarea", "form-control", null, "rows", String.valueOf(getRows()), "placeholder", getPlaceHolder(), "id", getId() );
		out.endTag("textarea");
	}

	@Override
	protected void doRenderView(Response out) {
		out.startTag("p", "form-control-static", this.getTagAttributes());
	}

	public int getRows() {
		return rows;
	}

	public void setRows(int rows) {
		this.rows = rows;
	}

}
